package com.example.chat.model;

import com.example.chat.type.MessageType;
import com.example.chat.type.PushMessageSystem;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

@Data
@Entity
@Table(name = "VDOA035_MSG_TEMP")
@DynamicInsert
@DynamicUpdate
public class MessageTemplate extends BaseEntity{

    /**
     * 主键
     */
    @Id
    @Column(name = "DOA035_ID")
    private String id;

    /**
     * 信息类型
     */
    @Column(name = "DOA035_MSG_SYSTEM")
    @Enumerated(value = EnumType.STRING)
    private PushMessageSystem pushMessageSystem;

    /**
     *
     */
    @Column(name = "DOA035_MSG_TYPE")
    @Enumerated(value = EnumType.STRING)
    private MessageType messageType;

    /**
     * 信息模板
     */
    @Column(name = "DOA035_TEMPLATE", length = 2555)
    private String template;

    /**
     * 信息主题
     */
    @Column(name = "DOA035_THEME")
    private String theme;
}
